package com.zk.shop.util;

import com.github.pagehelper.PageInfo;

import java.util.List;

public class Result {

    private String code;
    private String message;
    private boolean success;
    private Object pojo;
    private List<Object> objList;
    private PageInfo pageInfo;

    public Result(String code, String message, boolean success, PageInfo pageInfo) {
        this.code = code;
        this.message = message;
        this.success = success;
        this.pageInfo = pageInfo;
    }

    public Result(String code, String message, boolean success, List<Object> objList) {
        this.code = code;
        this.message = message;
        this.success = success;
        this.objList = objList;
    }

    public Result(String code, String message, boolean success) {
        this.code = code;
        this.message = message;
        this.success = success;
    }

    public Result(String code, String message, boolean success, Object pojo) {
        this.code = code;
        this.message = message;
        this.success = success;
        this.pojo = pojo;
    }


    public boolean isSuccess() {
        return success;
    }

    public PageInfo getPageInfo() {
        return pageInfo;
    }

    public void setPageInfo(PageInfo pageInfo) {
        this.pageInfo = pageInfo;
    }

    public String getCode() {
        return code;
    }

    public void setCode(String code) {
        this.code = code;
    }

    public String getMessage() {
        return message;
    }

    public void setMessage(String message) {
        this.message = message;
    }

    public boolean getSuccess() {
        return success;
    }

    public void setSuccess(boolean success) {
        this.success = success;
    }

    public Object getPojo() {
        return pojo;
    }

    public void setPojo(Object pojo) {
        this.pojo = pojo;
    }

    public List<Object> getObjList() {
        return objList;
    }

    public void setObjList(List<Object> objList) {
        this.objList = objList;
    }
}
